/*
 * @Description: pdf file 预览
 * @Author: Rfan
 * @Date: 2022-03-01 15:08:23
 * @LastEditTime: 2023-02-24 15:26:09
 */

import classNames from 'classnames/bind';

import styles from '../styles/pdfViewer.module.scss';
const cx = classNames.bind(styles);

const PDFViewer = (props: any) => {
  const { src, title } = props;
  return (
    <div className={`pdf-viewer ${cx('pdf-viewer')}`}>
      <iframe
        title={title}
        src={`http://192.168.0.202:8888/pdf/pdfjs/web/viewer.html?file=${src}`}
        width="100%"
        height="100%"
      ></iframe>
    </div>
  );
};

export default PDFViewer;
